#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT([tgs], [1.0], [http://code.google.com/p/tgs/], [tgs])
AC_CONFIG_SRCDIR([tgs.c])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE

# Checks for programs.
AC_PROG_CC

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h curses.h errno.h fcntl.h inttypes.h netdb.h netinet/in.h poll.h pthread.h signal.h stdarg.h stdlib.h string.h sys/poll.h sys/socket.h sys/time.h time.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_TIME

# Checks for library functions.
AC_FUNC_REALLOC
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday memchr memmove memset socket strcasecmp strerror strspn])
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([socket], [socket])
AC_CHECK_LIB([nsl], [inet_addr])
AC_CHECK_LIB([curses], [initscr])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
